import request from "../utils/request";

//查询班级列表
export const queryClazzsApi=(name,begin,end,page,pageSize)=>{
    return request.get(`/clazzs?name=${name}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`);
};

//新增班级
export const addClazzApi=(clazz)=>{
    return request.post("/clazzs",clazz);
};

//删除班级
export const deleteClazzApi=(id)=>{
    return request.delete(`/clazzs/${id}`);
};

//通过id查询班级
export const queryClazzByIdApi=(id)=>{
    return request.get(`/clazzs/${id}`);
};

//修改班级
export const updateClazzApi=(clazz)=>{
    return request.put("/clazzs",clazz);
};

//查询所有班级
export const queryAllClazzApi=()=>{
    return request.get("/clazzs/list");
};
